package com.sun.tspalgorithm.entity;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.ArrayList;

@Data
@AllArgsConstructor
public class CityManager {
    //City数组
    private static ArrayList destinationCities = new ArrayList<City>();


    public static void addCity(City city) {
        destinationCities.add(city);
    }

    public static City getCity(int index){
        return (City)destinationCities.get(index);
    }

    // 获得当前City的数量
    public static int numberOfCities(){
        return destinationCities.size();
    }
}
